import java.io.*;

public class Peer implements Serializable
{
    public String hostname;
    public int port;
    public String name;
    public int lamport_timestamp;

    public boolean equals(Object o)
    {
        //System.err.println("using my equal");
        if(o instanceof Peer) {
            Peer p = (Peer)o;
            if ((p.hostname.equals(this.hostname) && (p.port == port)) || (p.name.equals(this.name)))
                return true;
            else return false;
        }
        return this.equals(o);
    }

	public int hashCode()
	{
		return name.hashCode();
	}

}
